/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ten;

public class Problem7 {
    public static void main(String args[]){
        int i=3,j=1;
        for(;j<10001;i+=2){
            Prime prime = new Prime(i);
            if(prime.is_prime()){
                j++;
            }
        }
        System.out.println(i-2);

    }
}

class Prime{
    public long num;
    
    public Prime(long i){
        num = i;
    }
    public boolean is_prime(){
        for(long i=2;i*i<=num;i++){
            if(num%i == 0){
                return false;
            }
        }
        return true;
    }
}